const express=require('express');
const router=express.Router();
const {FriendInfo,updateFriend,addFriend,deleteFriend}=require('../service/FriendChainService.js')
router.get('/FriendInfo',async function(req, res,next) {
  let data=await FriendInfo();
  res.send(data);
}) 

router.post('/updateFriend',async function(req, res, next) {
  let data=await updateFriend(req.body);
  res.send();
})

router.post('/addFriends',async function(req, res, next){
  let data=await addFriend(req.body);
})

router.post('/deleteFriend',async function(req, res, next){
  let data=await deleteFriend(req.body);
})
module.exports =router;